export const getCurrentTime = () => {
	var date = new Date(); //当前时间
	var year = date.getFullYear() //返回指定日期的年份
	var month = repair(date.getMonth() + 1); //月
	var day = repair(date.getDate()); //日
	var hour = repair(date.getHours()); //时
	var minute = repair(date.getMinutes()); //分
	var second = repair(date.getSeconds()); //秒

	//当前时间 
	var curTime = year + "-" + month + "-" + day +
		" " + hour + ":" + minute + ":" + second;
	return curTime;
}

const repair = (i) => {
	if (i >= 0 && i <= 9) {
		return "0" + i;
	} else {
		return i;
	}
}
